package org.nerve.spring.data.mongo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * org.nerve.spring.data.mongo
 * Created by zengxm on 2016/6/16.
 */
@Document(indexName = "test", type = "book")
public class Book {
	@Id
	private String id;
	@Field(type = FieldType.String,store = true)
	private String name;
	@Field(type = FieldType.String,store = true)
	private String author;

	public String getId() {
		return id;
	}

	public Book setId(String id) {
		this.id = id;
		return this;
	}

	public String getName() {
		return name;
	}

	public Book setName(String name) {
		this.name = name;
		return this;
	}

	public String getAuthor() {
		return author;
	}

	public Book setAuthor(String author) {
		this.author = author;
		return this;
	}
}
